Field of the Invention
This invention relates to managing data in a data storage device and more particularly relates to managing data in a storage device using an empty data segment directive.
Description of the Related Art
Typically, when data is no longer useful it may be erased. In many file systems, an erase command deletes a directory entry in the file system while leaving the data in place in the storage device containing the data. Typically, a data storage device is not involved in this type of erase operation. Another method of erasing data is to write zeros, ones, or some other null data character to the data storage device to actually replace the erased file. However, this is inefficient because valuable bandwidth is used while transmitting the data is being overwritten. In addition, space in the storage device is taken up by the data used to overwrite invalid data.
In some storage devices, like the solid-state storage device 102 described herein, updating previously stored data does not overwrite existing data. Attempting to overwrite data with a string of ones or a string of zeros on such a device takes up valuable space without fulfilling the desired intent of overwriting the existing data. For these devices, such as solid-state storage devices 102, a client 114 typically does not have an ability to overwrite data to erase it.
When receiving a string of repeated characters or character strings, the received data is highly compressible, but typically compression is done by a file system prior to transmission to a storage device. A typical storage device cannot distinguish between compressed data and uncompressed data. The storage device may also receive a command to read the erased file so the storage device may transmit a stream of zeros, ones, or a null character to the requesting device. Again, bandwidth is required to transmit data representing the erased file.